package com.carolouvindam;

import android.content.Context;
import android.content.Intent;
import android.net.Uri;
import com.carolouvindam.Model.Order;

public class GoogleMapManager {
    Context context;

    public GoogleMapManager(Context context) {
        this.context = context;
    }

    void easyShowOnMap(Order order)
    {
        Intent intent = new Intent();
        intent.setAction(Intent.ACTION_VIEW);
        intent.setData(Uri.parse("geo:0,0?q="+order.getAddress().toUriComponent()));
        intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
        context.startActivity(intent);

    }
}
